home *** CD-ROM | disk | FTP | other *** search
- Path: news1.h1.usa.pipeline.com!usenet
- From: grantp@usa.pipeline.com(Pete)
- Newsgroups: comp.lang.c++
- Subject: Re: HELP: Strange DLL linker warning!
- Date: 7 Feb 1996 23:46:58 GMT
- Organization: Kalevi, Inc.
- Message-ID: <4fbdli$7cr@news1.usa.pipeline.com>
- References: <4f8ljg$ffl@sam.inforamp.net>
- NNTP-Posting-Host: pipe2.h1.usa.pipeline.com
- X-PipeUser: grantp
- X-PipeHub: usa.pipeline.com
- X-PipeGCOS: (Pete)
- X-Newsreader: Pipeline USA v3.3.0
-
- On Feb 06, 1996 22:49:17 in article <Re: HELP: Strange DLL linker
- warning!>, 'rmorin@inforamp.net (Randy Charles Morin)' wrote:
-
-
- >In article <4f7v88$k40@scotsman.ed.ac.uk>,
- >Steven <steven@srv1.jig.ed.ac.uk> wrote:
- >>hi,
- >>
- >>I have a DLL and I want to export the functions within it. So in the DLL
-
- >definition
- >>file (*.def) at the EXPORT section I have entered the names of the
- functions
- >I want
- >>to export. But low and behold I get the following warning:
- >>
- >>Linker Warning: Attempt to export non-public symbol 'function name'
- >>
- >>Why? I don't know how to declare these functions as public and I have
- >explicitly
- >>defined them as _export . Can anyone help. By the way I'm using the 3.1
- >compiler.
- >>Cheers!
- >>
- >>Steve
- >>
- >
- >Switches, switches switches. Either, you need to change the case
- sensitive
- >link switches or the export function from DLL switches. I could be wrong
-
- >though.
- >
- A more common error: failing to wrap the exported c++ function
- declaration with extern "C" and _pascal. Example:
-
- extern "C" int CALLBACK _export Foo (int Bar) { ... };
-
- The macro CALLBACK is defined in <windows.h> as _far _pascal,
- or whatever is appropriate with your compiler system. This may
- not be so with older systems; if not, substitute the keywords
- yourself.
-
- --
- Pete Grant
- Kalevi, Inc.
- Object Oriented Software Development
-